package com.zabra.zl.ui.bargain.tab.history;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.zabra.zl.R;
import com.zabra.zl.data.OrderListBean;

import java.util.List;

public class Adp extends BaseQuickAdapter<OrderListBean.RespDataBean, BaseViewHolder> {
    public Adp(int layoutResId, @Nullable List<OrderListBean.RespDataBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, OrderListBean.RespDataBean item) {
        helper.setText(R.id.item_state, item.getEntrustType() == 1 ? "买入" : "卖出")
                .setText(R.id.item_num, item.getExtendSuccessNumber() + "")
                .setText(R.id.item_price, item.getExtendSuccessPrice() + "")
                .setText(R.id.item_time, item.getExtendAddTimeEnd())
                .setText(R.id.item_date, item.getExtendAddTimeStart())
                .setText(R.id.item_money, item.getExtendSuccessMoney()+"");
    }
}
